<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('个人信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
<!--            <div class="col-sm-12 search-collapse">-->
<!--                <form id="formId">-->
<!--                    <div class="select-list">-->
<!--                        <ul>-->
<!--                            <li>-->
<!--                                <label>姓名：</label>-->
<!--                                <input type="text" name="uName"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>电话：</label>-->
<!--                                <input type="text" name="uPhone"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>电子邮箱：</label>-->
<!--                                <input type="text" name="uEmail"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>身份证：</label>-->
<!--                                <input type="text" name="uCard"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>学历：</label>-->
<!--                                <select name="uEducation" th:with="type=${@dict.getType('sys_education')}">-->
<!--                                    <option value="">所有</option>-->
<!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!--                                </select>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>学位：</label>-->
<!--                                <select name="uDegree" th:with="type=${@dict.getType('sys_degree')}">-->
<!--                                    <option value="">所有</option>-->
<!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!--                                </select>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>职称：</label>-->
<!--                                <select name="uRank" th:with="type=${@dict.getType('sys_rank')}">-->
<!--                                    <option value="">所有</option>-->
<!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!--                                </select>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>所在系部：</label>-->
<!--                                <select name="uDepartment" th:with="type=${@dict.getType('sys_department')}">-->
<!--                                    <option value="">所有</option>-->
<!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!--                                </select>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>研究方向：</label>-->
<!--                                <select name="uResearch" th:with="type=${@dict.getType('sys_research')}">-->
<!--                                    <option value="">所有</option>-->
<!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!--                                </select>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>关联id：</label>-->
<!--                                <input type="text" name="uId"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>性别：</label>-->
<!--                                <select name="uSex" th:with="type=${@dict.getType('sys_user_sex')}">-->
<!--                                    <option value="">所有</option>-->
<!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!--                                </select>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>-->
<!--                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>-->
<!--                            </li>-->
<!--                        </ul>-->
<!--                    </div>-->
<!--                </form>-->
<!--            </div>-->

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="ruoyi:personal:add">
                    <i class="fa fa-plus"></i> 添加个人信息
                </a>
<!--                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="ruoyi:personal:edit">-->
<!--                    <i class="fa fa-edit"></i> 修改-->
<!--                </a>-->
<!--                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="ruoyi:personal:remove">-->
<!--                    <i class="fa fa-remove"></i> 删除-->
<!--                </a>-->
<!--                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="ruoyi:personal:export">-->
<!--                    <i class="fa fa-download"></i> 导出-->
<!--                </a>-->
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('ruoyi:personal:edit')}]];
        var removeFlag = [[${@permission.hasPermi('ruoyi:personal:remove')}]];
        var uEducationDatas = [[${@dict.getType('sys_education')}]];
        var uDegreeDatas = [[${@dict.getType('sys_degree')}]];
        var uRankDatas = [[${@dict.getType('sys_rank')}]];
        var uDepartmentDatas = [[${@dict.getType('sys_department')}]];
        var uResearchDatas = [[${@dict.getType('sys_research')}]];
        var uSexDatas = [[${@dict.getType('sys_user_sex')}]];
        var prefix = ctx + "ruoyi/personal";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "个人信息",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'uName',
                    title: '姓名'
                },
                {
                    field: 'uPhone',
                    title: '电话'
                },
                {
                    field: 'uEmail',
                    title: '电子邮箱'
                },
                {
                    field: 'uCard',
                    title: '身份证'
                },
                {
                    field: 'uEducation',
                    title: '学历',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(uEducationDatas, value);
                    }
                },
                {
                    field: 'uDegree',
                    title: '学位',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(uDegreeDatas, value);
                    }
                },
                {
                    field: 'uRank',
                    title: '职称',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(uRankDatas, value);
                    }
                },
                {
                    field: 'uDepartment',
                    title: '所在系部',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(uDepartmentDatas, value);
                    }
                },
                {
                    field: 'uResearch',
                    title: '研究方向',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(uResearchDatas, value);
                    }
                },
                {
                    field: 'uId',
                    title: '关联id',
                    visible: false
                },
                {
                    field: 'uSex',
                    title: '性别',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(uSexDatas, value);
                    }
                },
                {
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        if (row.id!=null){
                            $("#toolbar").attr("style","display:none;");
                        }
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });

    </script>
</body>
</html>